n written out as text, for building a line of text around a number - converting a number to text. string(5) is "5".
string(n) -> string| Name | Type |
|---|---|
n | real |
string
n written out as text, for building a line of text around a number - converting a number to text. string(5) is the text 5.
For a number embedded directly in a message, $"score: {score}" template-string interpolation already does this for you. Reach for string instead when you need the number's text ON ITS OWN - to pass into string_join/string_replace, to compare, or to store.
var score = 1200;
var score_text = string(score);
var line = string_join("FINAL SCORE ", score_text);Uses the exact same conversion $"...{n}..." already does internally for a number, in a fixed 16-character buffer - large enough for any ordinary score/coordinate/timer; an extreme value can still be cut, the same as everywhere else in this group.
Uses the exact same conversion $"...{n}..." template-string interpolation already does internally for a number, in a fixed 16-character buffer - large enough for any ordinary score/coordinate/timer; an extreme value can still be cut, the same as everywhere else in this file.